﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/userlogin/login.css">
    <title>css3精美紫色渐变背景登录页面代码</title>
    <script src="../js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript">
      function register(){
            $.post("../login/register",$("#regForm").serialize(),function (res){
                console.log(res)
                if(res.code==200){
                 alert("注册成功，请您重新登录");
                 location.replace("userLogin.html");
                }else {
                    alert(res.msg);
                }
            },"json")
      }
    </script>
</head>
<body>
<div class="container">
    <div class="login-form">
        <div class="text">注册</div>
        <form id="regForm">
            <div class="form-item">
                <input type="text" name="nickname" placeholder="昵称">
                <input type="text" name="account" placeholder="账号">
                <input type="password" name="password" placeholder="密码">
            </div>
            <div class="btn" onclick="register()">保存</div>
        </form>
        <div class="btn-back"></div>
        <div class="other">
            已有账号<a href="userLogin.html">去登录</a>
        </div>
    </div>
</div>

</body>
</html>
